package cn.yl.pay.service.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 支付订单状态日志表
 * </p>
 *
 * @author yl
 * @since 2022-04-22
 */
@Getter
@Setter
@Accessors(chain = true)
@ApiModel(value = "PayOrderRecord对象", description = "支付订单状态日志表")
public class PayOrderRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    public PayOrderRecord() {
    }

    public PayOrderRecord(String orderNo, String type, String fromStatus, String toStatus, Integer paidAmount, String remark, String createdBy) {
        this.orderNo = orderNo;
        this.type = type;
        this.fromStatus = fromStatus;
        this.toStatus = toStatus;
        this.paidAmount = paidAmount;
        this.remark = remark;
        this.createdBy = createdBy;
    }

    @ApiModelProperty("订单号")
    @TableField("order_no")
    private String orderNo;

    @ApiModelProperty("操作类型：CREATE|PAY|REFUND...")
    @TableField("type")
    private String type;

    @ApiModelProperty("原订单状态")
    @TableField("from_status")
    private String fromStatus;

    @ApiModelProperty("新订单状态")
    @TableField("to_status")
    private String toStatus;

    @ApiModelProperty("实付金额，单位为分")
    @TableField("paid_amount")
    private Integer paidAmount;

    @ApiModelProperty("备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty("操作人")
    @TableField("created_by")
    private String createdBy;


}
